1 <?php
2 session_start();
3 error_reporting(
0);
4 include(
'includes/config.php');
5 if
(strlen($_SESSION['login'])==0)
6     {
7 header(
'location:index.php');
8 }

9 else
{
10 if
(isset($_POST['submit6']))
11     {
12 $name=$_POST[
'name'];
13 $mobileno=$_POST[
'mobileno'];
14 $email=$_SESSION[
'login'];
15
16 $sql=
"update tblusers set FullName=:name,MobileNumber=:mobileno where EmailId=:email";
17 $query = $dbh->prepare($sql);
18 $query->bindParam(
':name',$name,PDO::PARAM_STR);
19 $query->bindParam(
':mobileno',$mobileno,PDO::PARAM_STR);
20 $query->bindParam(
':email',$email,PDO::PARAM_STR);
21 $query->execute();
22 $msg=
"Profile Updated Successfully";
23 }
24
25 ?>
26 <!DOCTYPE HTML>
27 <html>
28 <head>
29 <title>TMS | Tourism Management System</title>
30 <meta name=
"viewport" content="width=device-width, initial-scale=1">
31 <meta http-equiv=
"Content-Type" content="text/html; charset=utf-8" />
32 <meta name=
"keywords" content="Tourism Management System In PHP" />
33 <script type=
"applijewelleryion/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
34 <link href=
"css/bootstrap.css" rel='stylesheet' type='text/css' />
35 <link href=
"css/style.css" rel='stylesheet' type='text/css' />
36 <link href=
'//fonts.googleapis.com/css?family=Open+Sans:400,700,600' rel='stylesheet' type='text/css'>
37 <link href=
'//fonts.googleapis.com/css?family=Roboto+Condensed:400,700,300' rel='stylesheet' type='text/css'>
38 <link href=
'//fonts.googleapis.com/css?family=Oswald' rel='stylesheet' type='text/css'>
39 <link href=
"css/font-awesome.css" rel="stylesheet">
40 <!-- Custom Theme files -->
41 <script src=
"js/jquery-1.12.0.min.js"></script>
42 <script src=
"js/bootstrap.min.js"></script>
43 <!--animate-->
44 <link href=
"css/animate.css" rel="stylesheet" type="text/css" media="all">
45 <script src=
"js/wow.min.js"></script>
46     <script>
47          
new WOW().init();
48     </script>
49
50   <style>
51         .errorWrap {
52     padding: 10px;
53     margin:
0 0 20px 0;
54     background: #fff;
55     border-left: 4px solid #dd3d36;
56     -webkit-box-shadow:
0 1px 1px 0 rgba(0,0,0,.1);
57     box-shadow:
0 1px 1px 0 rgba(0,0,0,.1);
58 }
59 .succWrap{
60     padding: 10px;
61     margin:
0 0 20px 0;
62     background: #fff;
63     border-left: 4px solid #5cb85c;
64     -webkit-box-shadow:
0 1px 1px 0 rgba(0,0,0,.1);
65     box-shadow:
0 1px 1px 0 rgba(0,0,0,.1);
66 }
67         </style>
68 </head>
69 <body>
70 <!-- top-header -->
71 <div
class="top-header">
72 <?php include(
'includes/header.php');?>
73 <div
class="banner-1 ">
74     <div
class="container">
75         <h1
class="wow zoomIn animated animated" data-wow-delay=".5s" style="visibility: visible; animation-delay: 0.5s; animation-name: zoomIn;">TMS-Tourism Management System</h1>
76     </div>
77 </div>
78 <!--- /banner-
1 ---->
79 <!--- privacy ---->
80 <div
class="privacy">
81     <div
class="container">
82         <h3
class="wow fadeInDown animated animated" data-wow-delay=".5s" style="visibility: visible; animation-delay: 0.5s; animation-name: fadeInDown;">Change Password</h3>
83         <form name=
"chngpwd" method="post">
84          <?php
if($error){?><div class="errorWrap"><strong>ERROR</strong>:<?php echo htmlentities($error); ?> </div><?php }
85                 
else if($msg){?><div class="succWrap"><strong>SUCCESS</strong>:<?php echo htmlentities($msg); ?> </div><?php }?>
86
87 <?php
88 $useremail=$_SESSION[
'login'];
89 $sql =
"SELECT * from tblusers where EmailId=:useremail";
90 $query = $dbh -> prepare($sql);
91 $query -> bindParam(
':useremail',$useremail, PDO::PARAM_STR);
92 $query->execute();
93 $results=$query->fetchAll(PDO::FETCH_OBJ);
94 $cnt=
1;
95 if
($query->rowCount() > 0)
96 {

97 foreach
($results as $result)
98 { ?>
99
100     <p style=
"width: 350px;">
101         
102             <b>Name</b> <input type=
"text" name="name" value="<?php echo htmlentities($result->FullName);?>" class="form-control" id="name" required="">
103     </p>
104
105 <p style=
"width: 350px;">
106 <b>Mobile Number</b>
107 <input type=
"text" class="form-control" name="mobileno" maxlength="10" value="<?php echo htmlentities($result->MobileNumber);?>" id="mobileno" required="">
108 </p>
109
110 <p style=
"width: 350px;">
111 <b>Email Id</b>
112     <input type=
"email" class="form-control" name="email" value="<?php echo htmlentities($result->EmailId);?>" id="email" readonly>
113             </p>
114 <p style=
"width: 350px;">
115 <b>Last Updation Date : </b>
116 <?php echo htmlentities($result->UpdationDate);?>
117 </p>
118
119 <p style=
"width: 350px;">
120 <b>Reg Date :</b>
121 <?php echo htmlentities($result->RegDate);?>
122             </p>
123 <?php }} ?>
124
125             <p style=
"width: 350px;">
126 <button type=
"submit" name="submit6" class="btn-primary btn">Updtae</button>
127             </p>
128             </form>
129
130         
131     </div>
132 </div>
133 <!--- /privacy ---->
134 <!--- footer-top ---->
135 <!--- /footer-top ---->
136 <?php include(
'includes/footer.php');?>
137 <!-- signup -->
138 <?php include(
'includes/signup.php');?>
139 <!--
//signu -->
140 <!-- signin -->
141 <?php include(
'includes/signin.php');?>
142 <!--
//signin -->
143 <!-- write us -->
144 <?php include(
'includes/write-us.php');?>
145 </body>
146 </html>
147 <?php } ?>


Gõ tìm kiếm nhanh...